
chaxun();
function  chaxun(){
	       $.ajax({
        url:urlcore+"/api/propertyType/selectTwoList",
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					//var sun=0;
					$.each(data.data.list, function(y,n) {
						//sun=0;
			var shuxing='<div class="dingdan_title">'+n.propertyName+'</div>'+
			           '<div class="goods_shuxing" >'+
                          '	<ul class="clearfix">';
			$.each(n.propertyTypeList, function(q,w) {
				/*sun++;
				 if(sun==1){
				 	   shuxing+='<li class="shuxing_curr" onclick="dianji(this)" id="'+w.id+'">'+w.propertyName+'</li>';
				 }else{*/
	        shuxing+='<li  onclick="dianji(this)"  id="'+w.id+'">'+w.propertyName+'</li>';
				 /*}*/
			});
			           shuxing+='</ul>'+
                          '</div>';
				$("#shuxing").append(shuxing);
					});
				}
			},
			error: function() {
				alert("error");
			}
		});
		
		
		}
		

/*$(function () {
	//切换
   	$('.goods_shuxing li').on('click',function(){
        //给菜单添加选择样式
        $(this).addClass('shuxing_curr').siblings().removeClass('shuxing_curr');
   
   	});
});
*/
 function  dianji(te){
 	       if($(te).attr("class")=="shuxing_curr"){
 	       	$(te).attr("class","");
 	       }else{
 	    $(te).addClass('shuxing_curr').siblings().removeClass('shuxing_curr');
 	       }

 }


 function quzhi(){
var shuid="";
var mingzi="";
          var shuxing=$("#shuxing").find("li"); 	 
          $.each(shuxing, function(y,n) {
          	   if($(this).attr("class")=="shuxing_curr"){
          	   	    shuid+=$(this).attr("id")+",";
          	   	    mingzi+=$(this).html()+",";
          	   }
          });
          var sizeidss=shuid.substring(0,shuid.length-1);
        var sizeidsss=mingzi.substring(0,mingzi.length-1);
       window.location.href = "24.2.0fabu_goods.html?idsss=r";
       
       sessionStorage.setItem("mingzis",sizeidsss);
       sessionStorage.setItem("shuids",sizeidss);
       sessionStorage.setItem("fengmians",sessionStorage.getItem("fengmian"));
       sessionStorage.setItem("xijietus",sessionStorage.getItem("xijietu"));
       sessionStorage.setItem("biaotis",sessionStorage.getItem("biaoti"));
        sessionStorage.setItem("miaoshus",sessionStorage.getItem("miaoshu"));
 	   sessionStorage.setItem("pifajias",sessionStorage.getItem("pifajia"));
        sessionStorage.setItem("jianhsus", sessionStorage.getItem("jianhsu"));
    /*   sessionStorage.setItem("nahuojias", sessionStorage.getItem("nahuojia"));*/
       sessionStorage.setItem("shuliangsss", sessionStorage.getItem("shuliangs"));
 	   sessionStorage.setItem("dabaojiages", sessionStorage.getItem("dabaojiage"));
 	   sessionStorage.setItem("dabaojianshus",sessionStorage.getItem("dabaojianshu"));
 	   sessionStorage.setItem("zhongliangs",sessionStorage.getItem("zhongliang"));
 	  sessionStorage.setItem("goodsids",sessionStorage.getItem("goodsid"));
       sessionStorage.setItem("tuijians",sessionStorage.getItem("tuijian"));
       sessionStorage.setItem("huiyuanguankans",sessionStorage.getItem("huiyuanguankan"));
       sessionStorage.setItem("banshibaohus",sessionStorage.getItem("banshibaohu"));
        sessionStorage.setItem("yanshes",sessionStorage.getItem("yanshe"));
	 sessionStorage.setItem("yansheids",sessionStorage.getItem("yansheid"));
	  sessionStorage.setItem("sizeids",sessionStorage.getItem("sizeid"));
	  sessionStorage.setItem("chimass",sessionStorage.getItem("chimas"));
 }

  